package org.wx.thread;

/**
 * @description:
 * @author: wangxun
 * @createDate: 2021/12/9
 * @version: 1.0
 */
public class Test {

        static boolean flag = false;
        public static void main(String[] args) throws InterruptedException {
            new Thread(()->{
                System.out.println("start");
                while(!flag){

                }
                System.out.println("end");
            }).start();
            Thread.sleep(1000);
            flag = true;
        }

}
